package com.example.shop.order.dto;


import com.example.shop.order.enums.PaymentMethod;
import com.example.shop.pojo.Courier;
import com.example.shop.pojo.Order;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@Accessors(chain = true)
public class OrderDetailInfo extends OrderBrowseInfo {

    /**
     * 支付凭证
     */
    private String transactionId;
    /**
     * 该订单关联的快递信息
     */
    private Courier courier;

    /**
     * 支付的形式：微信支付、支付宝支付
     */
    private PaymentMethod paymentMethod;

    /**
     * 用户下单的时间（即支付成功时的时间）
     */
    private LocalDateTime orderTime;

    /**
     * 商家发货时间
     */
    private LocalDateTime deliveryTime;

    @Override
    public String toString() {
        return "OrderDetailInfo{" +
                super.toString() +
                " courier=" + courier +
                ", paymentMethod=" + paymentMethod +
                ", orderTime=" + orderTime +
                ", deliveryTime=" + deliveryTime +
                '}';
    }
}
